\subsection{方法一}
\begin{tikzpicture}[
    nonterminate/.style={
        rectangle,
        minimum size=6mm,
        very thick,
        draw=red!50!black,
        top color=white,
        bottom color=red!20
    },
    terminate/.style={
        rectangle, rounded corners=3mm, minimum size=6mm,
        very thick, draw=black
    },
    node distance = 5mm and 5mm
    ]


\node[nonterminate](uint1){unsigned integer};

\node[terminate, right=of uint1](dot){.};
\node[terminate, right=of dot](digit){digit};
\node[terminate, right=of digit](E){E};
\node[terminate, above right=of E](plus){+};

\node[terminate, below right=of E](minus){-};

\node[nonterminate, below right=of plus](uint2){unsigned integer};

\path(uint1) edge[->] (dot)
    (dot)   edge[->](digit)
    (digit)  edge[->](E)
    (E)      edge[->](uint2);

 \draw[->] 
   ($(digit.east) + (2mm, 0)$)
   --
   ++(0, -5mm)
   -| ($(digit.west) - (2mm, 0)$);
   
 \draw[->]
   ($(uint1.east) + (2mm, 0)$)
   --
   ++(0, 5mm)
   -|
   ($(digit.east) + (4mm, 0)$);
 

\end{tikzpicture}

\subsection{方法二}


\begin{tikzpicture}[
    skip loop/.style={to path={-- ++(0, #1) -| (\tikztotarget)}},
    hv path/.style={to path={-| (\tikztotarget)}},
    vh path/.style={to path={|- (\tikztotarget)}},
    point/.style={circle, minimum size=2pt
     , fill=red
    },
    nonterminate/.style={
        rectangle,
        minimum size=6mm,
        very thick,
        draw=red!50!black,
        top color=white,
        bottom color=red!20
    },
    terminate/.style={
        rectangle, rounded corners=3mm, minimum size=6mm,
        very thick, draw=black
    },
    graphs/every graph/.style={edges=rounded corners},
    node distance = 5mm and 5mm
    ]

    \matrix[row sep=1mm, column sep=2mm]{
        & & & & & & & & & & \node[terminate](plus){+}; & & & \\
        \node[coordinate](p1){}; &
        \node[nonterminate](uint1){unsigned integer};&
        \node[coordinate](p2){}; &
        \node[terminate](dot){.}; &
        \node[coordinate](p3){};&
        \node[terminate](digit){digit};&
        \node[coordinate](p4){};&
        \node[coordinate](p5){};&
        \node[terminate](E){E};&
        \node[coordinate](p6){};&
        &
        \node[coordinate](p7){};&
        \node[nonterminate](uint2){unsigned integer};&
        \node[coordinate](p8){};\\
        & & & & & & & & & & \node[terminate](minus){-}; & & & \\
        };

   \graph {
       (p1) -> (uint1) -- (p2) -> (dot) -- (p3) -> (digit) -- (p4) -- (p5) ->(E)
        -- (p6) -- (p7) -> (uint2) -> (p8);
       (p2) -> [skip loop=5mm](p5);
       (p4) -> [skip loop=-5mm](p3);
       (p6) -> [vh path] (plus) -> [hv path](p7);
       (p6) -> [vh path] (minus) -> [hv path](p7);
       (p5) -> [skip loop=-11mm](p8);
        
   };     
\end{tikzpicture}


\subsection{方法三： graph 命令}

\tikz[
    ->=stealth’, black!50, text=black, thick,    
    every new ->/.style={shorten >= 1pt},
nonterminate/.style={
    rectangle,
    minimum size=6mm,
    very thick,
    draw=red!50!black,
    top color=white,
    bottom color=red!20
},
terminate/.style={
    rectangle, rounded corners=3mm, minimum size=6mm,
    very thick, draw=black
},
skip loop/.style={to path={-- ++(0, #1) -| (\tikztotarget)}},
    hv path/.style={to path={-| (\tikztotarget)}},
    vh path/.style={to path={|- (\tikztotarget)}},
    graphs/every graph/.style={edges=rounded corners},
    skip loop/.style={to path={-- ++(0, #1) -| (\tikztotarget)}}
] \graph[grow right sep, simple] {
    / -> 
    unsigned integer[nonterminate] --
    p1[coordinate] ->
    "."[terminate]   --
    p2[coordinate] --> 
    digit[terminate] --
    p3[coordinate] --
    p4[coordinate] --
    p5[coordinate] ->
    E[terminate] --
    q1[coordinate] -> [vh path]
    {
      [nodes={yshift=10mm}]  
      "+"[terminate],
      "q2"[coordinate],
      "-"[terminate]
    } -> [hv path]
    q3[coordinate] --
    uint2/unsigned integer[nonterminate]
    ->
    p6/[coordinate];
    p1 -> [skip loop]p3;
    p4 -> [skip loop=-10mm]p2;
    p5 -> [skip loop=-20mm]p6;

    q1 -- q2 -- q3;
};
